<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="number" value="">
    <select name="" id="sel">
        <option value="+">+</option>
        <option value="-">-</option>
        <option value="*">*</option>
        <option value="/">/</option>
    </select>
    <input type="number" value="">
    <button id="btn">=</button>
    <input type="number" value="" disabled>
    <script>
        var inp1 = document.getElementsByTagName('input')[0]
        var inp2 = document.getElementsByTagName('input')[1]
        var inp3 = document.getElementsByTagName('input')[2]
        btn.onclick = function () {
            var num1 = inp1.value - 0
            var num2 = inp2.value - 0
            if (sel.value == '+') {
                var num3 = num1 + num2
            } else if (sel.value == '-') {
                num3 = num1 - num2
            } else if (sel.value == '*') {
                num3 = num1 * num2
            } else if (sel.value == '/') {
                num3 = num1 / num2
            }
            inp3.value = num3
        }
    </script>
</body>

</html>